(InputText as any) as any =>
if Value.Type(InputText) = type text then
    let
        CleanData = 
            Text.Combine(
                List.Select(
                    Text.Split(
                        Text.Trim(InputText), " "
                    ),  each _ <> ""
                ), " "
            )
    in
        CleanData
else
    InputText